Skip to content

arrow-flight: generate dict_ids for dicts nested inside complex types#9556

Open
asubiotto wants to merge 1 commit intoapache:mainfrom
polarsignals:asubiotto/ipcid
Open

arrow-flight: generate dict_ids for dicts nested inside complex types#9556
asubiotto wants to merge 1 commit intoapache:mainfrom
polarsignals:asubiotto/ipcid

Conversation

@asubiotto
Copy link
Contributor

Some cases were missing.

Which issue does this PR close?

Rationale for this change

Fix flight encoding panic

What changes are included in this PR?

Assigning dict ids properly to nested dicts

Are these changes tested?

Yes. The same tests fail on main.

Are there any user-facing changes?

@github-actions github-actions bot added arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels Mar 13, 2026
@asubiotto
Copy link
Contributor Author

cc @brancz

Some cases were missing.

Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
@brancz
Copy link
Contributor

brancz commented Mar 14, 2026

cc @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you -- makes sense to me @asubiotto and @brancz

I left some non blocking comments. If you would like to address them let me know otherwise I'll plan to merge this PR tomorrow

.with_metadata(field.metadata().clone())
}
}
DataType::ListView(inner) | DataType::LargeListView(inner) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this makes sense to add handling for these nested types.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be good to change the catch all at the bottom of the match statement to explicitly list out all remaining DataTypes as a way to audit that we didn't miss any additional nested types (either now or in the future)

        .with_metadata(field.metadata().clone()),
        _ => field.as_ref().clone(),
    }


let schema = Arc::new(Schema::new(vec![Field::new(
"dict_list_view",
DataType::ListView(Arc::new(Field::new_dictionary(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may make sense to add a test for LargeListView as well

@asubiotto
Copy link
Contributor Author

Thanks for the review @alamb, I'm happy to address the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flight encoding panics with "no dict id for field" with nested dict arrays

3 participants